package com.huanyang.controller;

import com.huanyang.anno.RequestLimiting;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@Slf4j
public class UserController {

    @GetMapping("/testRedisLimiting")
    @RequestLimiting(count = 3)
    public String testRedisLimiting() {
        log.info("current time：" + new Date());
        return "success";
    }
}
